package com.genesis.mall.mapper;

import com.genesis.mall.dto.CouponHistoryDetailDto;
import com.genesis.mall.entity.SmsCouponHistory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 优惠券使用、领取历史表 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2022-08-01
 */
@Mapper
public interface SmsCouponHistoryMapper extends BaseMapper<SmsCouponHistory> {
    @Select("select * from sms_coupon_history where member_id = #{memberId} and use_status = 0")
    List<CouponHistoryDetailDto> findById(Long memberId);

}
